import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import Table from './views/nav1/Table.vue'
import Form from './views/nav1/Form.vue'
import user from './views/nav1/user.vue'
import Page4 from './views/nav2/Page4.vue'
import Page5 from './views/nav2/Page5.vue'
import Page6 from './views/nav3/Page6.vue'
import echarts from './views/charts/echarts.vue'

/**部门单页面组件*/
import Department from './views/org/Department.vue'
/** 员工单页面组件*/
import Employee from './views/org/Employee.vue'
/** 测试抽屉 */
import Test from './views/org/Test.vue'
/** 员工抽屉测试 */
import Employee1 from './views/org/Employee1.vue'
/** 店铺单页面组件 */
import Shop from './views/org/Shop.vue'
/** 数据字典明细 */
import Systemdictionarydetail from './views/org/Systemdictionarydetail.vue'
/** 数据字典 */
import Systemdictionarytype from './views/org/Systemdictionarytype.vue'
/** 店铺入住 */
import ShopRegister from './views/ShopRegister.vue'


let routes = [
    {
        path: '/',
        component: Home,
        name: 'Charts',
        iconCls: 'fa fa-bar-chart',
        leaf: true,
        children: [
            { path: '/echarts', component: echarts, name: 'echarts' }
        ]
    },
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/ShopRegister',
        component: ShopRegister,
        name: '店铺入住',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: '组织机构',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/dept', component: Department, name: '部门管理' },
            { path: '/emp',  component: Employee, name: '员工管理' },
            { path: '/shop',  component: Shop, name: '店铺管理' },
            { path: '/test', component: Test, name: '测试抽屉' },
            { path: '/emp1', component: Employee1, name: '员工管理' },
            { path: '/ShopRegister', component: ShopRegister, name: '店铺入驻' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '数据字典',
        iconCls: 'el-icon-message',
        children: [
            { path: '/sdd', component: Systemdictionarydetail, name: '字典明细' },
            { path: '/sdt', component: Systemdictionarytype, name: '数据字典' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '',
        iconCls: 'fa fa-address-card',
        leaf: true,//只有一个节点
        children: [
            { path: '/page6', component: Page6, name: '导航三' }
        ]
    },

    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;